//
// UVisualCollisionEntity.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CRGBA;
import org.ryzom.nel.misc.CVector;

public class UVisualCollisionEntity {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public UVisualCollisionEntity(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(UVisualCollisionEntity obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        throw new UnsupportedOperationException("C++ destructor does not have public access");
      }
      swigCPtr = 0;
    }
  }

  public boolean snapToGround(CVector pos) {
    return nel3dJNI.UVisualCollisionEntity_snapToGround__SWIG_0(swigCPtr, this, CVector.getCPtr(pos), pos);
  }

  public boolean snapToGround(CVector pos, CVector normal) {
    return nel3dJNI.UVisualCollisionEntity_snapToGround__SWIG_1(swigCPtr, this, CVector.getCPtr(pos), pos, CVector.getCPtr(normal), normal);
  }

  public void setGroundMode(boolean groundMode) {
    nel3dJNI.UVisualCollisionEntity_setGroundMode(swigCPtr, this, groundMode);
  }

  public void setCeilMode(boolean ceilMode) {
    nel3dJNI.UVisualCollisionEntity_setCeilMode(swigCPtr, this, ceilMode);
  }

  public boolean getGroundMode() {
    return nel3dJNI.UVisualCollisionEntity_getGroundMode(swigCPtr, this);
  }

  public boolean getCeilMode() {
    return nel3dJNI.UVisualCollisionEntity_getCeilMode(swigCPtr, this);
  }

  public void setSnapToRenderedTesselation(boolean snapMode) {
    nel3dJNI.UVisualCollisionEntity_setSnapToRenderedTesselation(swigCPtr, this, snapMode);
  }

  public boolean getSnapToRenderedTesselation() {
    return nel3dJNI.UVisualCollisionEntity_getSnapToRenderedTesselation(swigCPtr, this);
  }

  public boolean getSurfaceInfo(CVector pos, CSurfaceInfo info) {
    return nel3dJNI.UVisualCollisionEntity_getSurfaceInfo(swigCPtr, this, CVector.getCPtr(pos), pos, CSurfaceInfo.getCPtr(info), info);
  }

  public boolean getStaticLightSetup(CRGBA sunAmbient, CVector pos, SWIGTYPE_p_std__vectorT_NL3D__CPointLightInfluence_t pointLightList, SWIGTYPE_p_unsigned_char sunContribution, CRGBA localAmbient) {
    return nel3dJNI.UVisualCollisionEntity_getStaticLightSetup(swigCPtr, this, CRGBA.getCPtr(sunAmbient), sunAmbient, CVector.getCPtr(pos), pos, SWIGTYPE_p_std__vectorT_NL3D__CPointLightInfluence_t.getCPtr(pointLightList), SWIGTYPE_p_unsigned_char.getCPtr(sunContribution), CRGBA.getCPtr(localAmbient), localAmbient);
  }

  public void displayDebugGrid(UDriver drv) {
    nel3dJNI.UVisualCollisionEntity_displayDebugGrid(swigCPtr, this, UDriver.getCPtr(drv), drv);
  }

}
